package com.twu.biblioteca;

import java.util.List;


public class ListFormatter {
    private final List<?extends Record> targetList;

    public ListFormatter(List<?extends Record> targetList) {
        this.targetList = targetList;
    }

    public String format() {
        StringBuilder sb = new StringBuilder();
        for (Record record : targetList) {
            sb.append(record.toString());
            sb.append("\n");
        }
        return sb.toString();
    }
}


